﻿@model CandidateManager.Areas.Coach.Models.ScheduleModifyModel

@{
    ViewBag.Title = @Resources.Coach.CoachScheduleList;
}

<p>
    @Html.ActionLink(@Resources.Coach.CoachCreateSchedule, "Create", "Schedule", new { @class = "common-btn BlueColor" })
</p>

<h2>@Resources.Coach.CoachScheduleList</h2>

<table class="bordered">
    <thead>
        <tr>
            <th class="Center column-detail">@Resources.Coach.CoachEdit</th>
            <th class="vertical-header">@Resources.Coach.CoachOccurrence</th>
            <th class="vertical-header">@Resources.Coach.CoachSubjectName</th>
            <th class="vertical-header">@Resources.Coach.CoachGroupName</th>
            <th class="vertical-header">@Resources.Coach.CoachStartDate</th>
            <th class="vertical-header">@Resources.Coach.CoachEndDate</th>
            <th class="Center column-detail">@Resources.Coach.CoachDelete</th>
        </tr>
    </thead>

    @foreach (var schedule in Model.Schedules)
    {
        <tr>
            <td class="Center column-detail">@Html.ActionLink(@Resources.Coach.CoachEdit, "Edit", "Schedule", new { @subjectId = schedule.SubjectId, @groupId = schedule.StudyGroupId }, new { @class = "common-btn BlueColor" })</td>
            <td class="Center column-detail">@Html.ActionLink(@Resources.Coach.CoachOccurrence, "Create", "Occurrence", new { @subjectId = schedule.SubjectId, @groupId = schedule.StudyGroupId }, new { @class = "common-btn BlueColor" })</td>
            <td>@Html.Label(schedule.Subject.Name)</td>
            <td>@Html.Label(schedule.StudyGroup.GroupName)</td>
            <td>@schedule.StartDate.ToString("MM/dd/yyyy")</td>
            <td>@schedule.EndDate.ToString("MM/dd/yyyy")</td>
            <td class="Center column-detail">@Html.ActionLink(@Resources.Coach.CoachDelete, "Delete", "Schedule", new { @subjectId = schedule.SubjectId, @groupId = schedule.StudyGroupId }, new { @class = "common-btn RedColor" })</td>
        </tr>
    }
</table>
